             
         })
     }
+    
+    @IBAction func findByPostcode(sender: UIButton) {
+        // check connection...
+        if !reachabilityCheck() {
+            return
+        }
+        
+        // get postcode in an alert...
+        let alertController = UIAlertController(title: "Enter Postcode", message: nil, preferredStyle: .Alert)
+        
+        // and a simple cancel button too!
+        let cancelAction = UIAlertAction(title: "Cancel", style: .Cancel) { (_) in
+            // do nothing really.
+        }
+        alertController.addAction(cancelAction)
+        
+        // we need the text field/it's behaviour set up...
+        let postcodeSearch = UIAlertAction(title: "Search", style: .Default) { (_) in
+            // get text field
+            let searchTextField = alertController.textFields![0] as UITextField
+            
+            // remove whitespace!!!!
+            let postcode:String = searchTextField.text.stringByReplacingOccurrencesOfString(" ", withString: "", options: NSStringCompareOptions.LiteralSearch, range: nil)
+            
+            
+            // start loading UI...
+            SwiftSpinner.show("Locating constituency")
+            
+            // now search...
+            YourNextMPAPIManager.getConstituencyWithPostcode(postcode, completionHandler: { (c) -> () in
+                self.loadCandidatesForConstituency(c!)
+                
+            })
+        }
+        
+        alertController.addTextFieldWithConfigurationHandler { (textField) in
+            // placeholder so the user knows what to do...
+            textField.placeholder = "Enter postcode"
+        }
+        
+        alertController.addAction(postcodeSearch)
+
+        
+        self.presentViewController(alertController, animated: true, completion: nil)
+        
+    }
+    
+    @IBAction func findByConstituencyList(sender: UIButton) {
+        // check connection...
+        if !reachabilityCheck() {
+            return
+        }
+        
+        // bit of loading UI...
+        SwiftSpinner.show("Loading constituencies...", animated: true)
+        
+        // load ConstituencyTableViewController (after getting constituencies!)
+        YourNextMPAPIManager.getConstituencies { (c) -> () in
+            // hide loading UI
+            SwiftSpinner.hide()
+            
+            // load it! (via constituenciesListSegue)
+            self.constituenciesList = c
+            self.performSegueWithIdentifier("constituenciesListSegue", sender: self)
+        }
+    }
+    
     
     func invalidConstituency() {
         // a generic 'not valid constituency' warning - ask the user to try again in an alert.

            self.performSegueWithIdentifier("candidatesListSegue", sender: self)
            
        })

    }
    
    @IBAction func findByPostcode(sender: UIButton) {
        // get postcode in an alert...
        let alertController = UIAlertController(title: "Enter Postcode", message: nil, preferredStyle: .Alert)
        
        // and a simple cancel button too!
        let cancelAction = UIAlertAction(title: "Cancel", style: .Cancel) { (_) in
            // do nothing really.
        }
        alertController.addAction(cancelAction)
        
        // we need the text field/it's behaviour set up...
        let postcodeSearch = UIAlertAction(title: "Search", style: .Default) { (_) in
            // get text field
            let searchTextField = alertController.textFields![0] as UITextField
            
            // remove whitespace!!!!
            let postcode:String = searchTextField.text.stringByReplacingOccurrencesOfString(" ", withString: "", options: NSStringCompareOptions.LiteralSearch, range: nil)
            
            
            // start loading UI...
            SwiftSpinner.show("Locating constituency")
            
            // now search...
            YourNextMPAPIManager.getConstituencyWithPostcode(postcode, completionHandler: { (c) -> () in
                self.loadCandidatesForConstituency(c!)
                
            })
        }
        
        alertController.addTextFieldWithConfigurationHandler { (textField) in
            // placeholder so the user knows what to do...
            textField.placeholder = "Enter postcode"
        }
        
        alertController.addAction(postcodeSearch)

        
        self.presentViewController(alertController, animated: true, completion: nil)
        
    }
    
    @IBAction func findByConstituencyList(sender: UIButton) {
        // bit of loading UI...
        SwiftSpinner.show("Loading constituencies...", animated: true)
        
        // load ConstituencyTableViewController (after getting constituencies!)
        YourNextMPAPIManager.getConstituencies { (c) -> () in
            // hide loading UI
            SwiftSpinner.hide()
            
            // load it! (via constituenciesListSegue)
            self.constituenciesList = c
            self.performSegueWithIdentifier("constituenciesListSegue", sender: self)
        }
    }
    
    func locationManager(manager: CLLocationManager!, didUpdateLocations locations: [AnyObject]!) {

    }
    
    @IBAction func findByLocation(sender: UIButton) {
        // check connection...
        if !reachabilityCheck() {
            return
        }
        
        // okay first check we have a current location - if we don't, we can't find anything from nothing...
        if currentLocation == nil {
            // alert the user then return.
