Added a distance method in the Position class