applied haversin math to the API call