added updateCoordinates