adding more error handling of the city