added error handling for failed geocode