added getDistance