debugging code
move haversine out