added logic to calculate distance from the stored lat/lng and the new lat/lng