Added positionObject() function