created a reverse geocoding function