Added a watchPosition function