pull length call out of for loop in updatePositions