added getdistance