I have a super simple geocoding function:
func getCoordinates(from address: String) { CLGeocoder().geocodeAddressString(address) { placemark, error in