changed return value of updatePosition