Now using the haversine distance function.