finding the mid-point of a line