Function addUpAndDownIndicesToAttributes