Function addUpIndicesToAttributes