change method update to updatePosition