Bug in linearDist function
Substitute haversine with linearDist