         let locale = prefferedLocale()
         for countryCode in countryCodeArray {
             let countryName:String = locale.displayNameForKey(NSLocaleCountryCode, value:countryCode)!;
-            
+            var countryInfo:CountryInfo!
             let phoneUtil = NBPhoneNumberUtil.sharedInstance()
             if let resolvedCountryCode = phoneUtil.getCountryCodeForRegion(countryCode){
-                if (resolvedCountryCode != "") {
-                    let countryInfo = CountryInfo(name:countryName, prefix:"+\(resolvedCountryCode)",code:countryCode)
+                if (resolvedCountryCode != 0) {
+                    countryInfo = CountryInfo(name:countryName, prefix:"+\(resolvedCountryCode)",code:countryCode)
                     countryArray.append(countryInfo)
                 }
-            }else {
+            }
+            
+            if(countryInfo == nil){
                 print("Not present: \(countryCode) \(countryName)")
             }
         }

        }
    }
    
}
        
        tableView.translatesAutoresizingMaskIntoConstraints = false
        self.addSubview(tableView)

    }
    
    func searchController() -> UISearchController{
