     @IBOutlet weak var resetButton: UIBarButtonItem!
 
     @IBAction func didTapFirstButton(sender: AnyObject) {
-        if let first = first {
-            mapView.removeAnnotation(first)
-        }
-
-        first = MKPointAnnotation()
-        if let first = first, location = mapView.userLocation.location {
-            first.coordinate = location.coordinate
-            mapView.addAnnotation(first)
-
-            recalculateCircle()
-            recalculateDoneButton()
+        if let coordinate = mapView.userLocation.location?.coordinate {
+            replaceFirstWithCoordinate(coordinate)
         }
     }
 
     @IBAction func didTapSecondButton(sender: AnyObject) {
-        if let second = second {
-            mapView.removeAnnotation(second)
-        }
-
-        second = MKPointAnnotation()
-        if let second = second, location = mapView.userLocation.location {
-            second.coordinate = location.coordinate
-            mapView.addAnnotation(second)
-
-            recalculateCircle()
-            recalculateDoneButton()
+        if let coordinate = mapView.userLocation.location?.coordinate {
+            replaceSecondWithCoordinate(coordinate)
         }
     }
     

            if annotation.isKindOfClass(MKCircle.self) {
                pinView?.pinTintColor = MKPinAnnotationView.greenPinColor()
                pinView?.canShowCallout = true
            } else {
                pinView?.pinTintColor = MKPinAnnotationView.redPinColor()
                pinView?.canShowCallout = false
            }
            
            return pinView

    }

    // -
    func replaceFirstWithCoordinate(coordinate:CLLocationCoordinate2D) {
        if let first = first {
            mapView.removeAnnotation(first)
        }

        first = MKPointAnnotation()
        if let first = first {
            first.coordinate = coordinate
            mapView.addAnnotation(first)

            recalculateCircle()
            recalculateDoneButton()
        }
    }

    func replaceSecondWithCoordinate(coordinate:CLLocationCoordinate2D) {
        if let second = second {
            mapView.removeAnnotation(second)
        }

        second = MKPointAnnotation()
        if let second = second {
            second.coordinate = coordinate
            mapView.addAnnotation(second)

            recalculateCircle()
            recalculateDoneButton()
        }
    }

    func recalculateCircle() {
        if let first = first, second = second {
            if let circle = circle {
