             completion(result, nil)
         }
     }
+    
+    // MARK: - Utilities
+    
+    class func parseCoordinate(fromDict dict: [String: Any]?, key: String) -> Double? {
+        guard let coordinatesDict = dict else { return nil }
+        
+        if let coordinateString = coordinatesDict[key] as? String {
+            return Double(coordinateString)
+        }
+        
+        return coordinatesDict[key] as? Double
+    }
 }

        return storyboard.instantiateViewController(withIdentifier: "USIGNormalizador") as! USIGNormalizadorController
    }
    
    public class func search(query: String, excluding: String? = nil, maxResults: Int = 10, completion: @escaping ([USIGNormalizadorAddress]?, USIGNormalizadorError?) -> Void) {
        let request = USIGNormalizadorAPI.normalizar(direccion: query, excluyendo: excluding, geocodificar: true, max: maxResults)
        
        api.request(request) { response in

            
            for item in addresses {
                let coordinates = item["coordenadas"] as? [String: Any]
                let latitude = USIGNormalizador.parseCoordinate(fromDict: coordinates, key: "y")
                let longitude = USIGNormalizador.parseCoordinate(fromDict: coordinates, key: "x")
                
                let address = USIGNormalizadorAddress(
                    address: (item["direccion"] as! String).trimmingCharacters(in: .whitespacesAndNewlines).uppercased(),
