Add function to get the distance between two points