Adding getCoordinates function