modified getHaversineDistance