Temporary indexToMove helper