 		pin.canShowCallout = true
 		return pin
 	}
+	
+	public func mapView(mapView: MKMapView!, didAddAnnotationViews views: [AnyObject]!) {
+		if let annotations = mapView.annotations {
+			assert(annotations.count == 1, "Only one annotation should be on map at a time")
+		}
+	}
 }
 
 // MARK: UISearchBarDelegate
 
 extension MapViewController: UISearchBarDelegate {
 	public func searchBar(searchBar: UISearchBar, textDidChange searchText: String) {
-		if searchText == "" {
+		// remove location if user presses clear or removes text
+		if searchText.isEmpty {
 			location = nil
 		}
 	}

		
		if (isMovingFromParentViewController() || isBeingDismissed()) {
			completion?(location)
		}
	}
	

	}
	
	func selectedLocation(location: Location) {
		// dismiss search results
		dismissViewControllerAnimated(true) {
			
			// change review to center result location
			let region = MKCoordinateRegionMakeWithDistance(location.coordinate,
				self.resultRegionDistance, self.resultRegionDistance)
			self.mapView.setRegion(region, animated: true)
			
			// set location, this also adds annotation
			self.location = location
		}
	}
}
