             "key": apiKey ?? ""
         ]
         if CLLocationCoordinate2DIsValid(self.coordinate) {
-
+            
             params["location"] = "\(coordinate.latitude),\(coordinate.longitude)"
-            if radius > 0{
+            if radius > 0 {
                 params["radius"] = "\(radius)"
             }
         }
-
+        
         GooglePlacesRequestHelpers.doRequest(
             "https://maps.googleapis.com/maps/api/place/autocomplete/json",
             params: params
-            ) { json in
-                if let predictions = json["predictions"] as? [[String: AnyObject]] {
-                    self.places = predictions.map { (prediction: [String: AnyObject]) -> Place in
-
-                        return Place(prediction: prediction, apiKey: self.apiKey)
-                    }
+        ) { json in
+            if let predictions = json["predictions"] as? [[String: AnyObject]] {
+                self.places = predictions.map { (prediction: [String: AnyObject]) -> Place in
                     
-                    self.tableView.reloadData()
+                    return Place(prediction: prediction, apiKey: self.apiKey)
                 }
-        }
-    }
-}
-extension GooglePlacesAutocompleteContainer
-{
-    @objc(updateSearchResultsForSearchController:) public func updateSearchResults(for searchController: UISearchController) {
-        if let searchText = searchController.searchBar.text , searchText.characters.count > 0 {
+                
+                self.tableView.reloadData()
+            }
+        }
+    }
+}
+
+extension GooglePlacesAutocompleteContainer {
+    public func updateSearchResults(for searchController: UISearchController)
+    {
+        if let searchText = searchController.searchBar.text, searchText.characters.count > 0 {
             getPlaces(searchText)
         }
         else {

        }
    }
    fileprivate func escape(_ string: String) -> String {
//        let legalURLCharactersToBeEscaped: CFStringRef = ":/?&=;+!@#$()',*"
        return (string as NSString).addingPercentEscapes(using: String.Encoding.utf8.rawValue)!
//        return CFURLCreateStringByAddingPercentEscapes(nil, string, nil, legalURLCharactersToBeEscaped, CFStringBuiltInEncodings.UTF8.rawValue) as String
    }
    /**
    Call the Google Places API and update the view with results.
    
    :param: searchString The search query
    */
    fileprivate func getPlaces(_ searchString: String) {
        var params = [
            "input": escape(searchString),

        let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! GooglePlaceTableViewCell
        
        // Get the corresponding candy from our candies array
        let place = self.places[indexPath.row]
        
        // Configure the cell
        cell.nameLabel.text = place.name
        
        cell.addressLabel.text = place.description
        cell.accessoryType = UITableViewCellAccessoryType.disclosureIndicator
        
