rearranged code for reverse geocode