Finding the coordinates of endpoints