Finding Coordinates of Endpoints