adds get_distance method