Finding the distance between two points