moved Haversine distance function from view to controller
refactored