adds distance method