fix unit tests for haversine function