         position.addObserver(self)
         position.distanceFilter = 20
         
-        // Example settings for AllowedAlways:
+        // Example, using settings for AllowedAlways tracking:
         // position.adjustLocationUseWhenBackgrounded = true
         // position.adjustLocationUseFromBatteryLevel = true
         
-        // tracking
+        // Example, using location tracking
         // if position.locationServicesStatus == .AllowedWhenInUse ||
         //      position.locationServicesStatus == .AllowedAlways {
         //      position.startUpdating()
         // }
-
     }
 }
 


extension ViewController {
    
    func handleLocationPermissionButton(_ button: UIButton!) {
        // request permissions based on the type of location support required.
        Position.shared.requestWhenInUseLocationAuthorization()
        //Position.shared.requestAlwaysLocationAuthorization()
    }
    
    func handleOneShotLocationButton(_ button: UIButton!) {
        let position = Position.shared
        if position.locationServicesStatus == .allowedWhenInUse ||
           position.locationServicesStatus == .allowedAlways {
            position.performOneShotLocationUpdate(withDesiredAccuracy: 150) { (location, error) -> () in
                print("one shot location update \(location) error \(error)")
            }
        } else if position.locationServicesStatus == .notAvailable {

        super.viewDidLoad()

        self.view.autoresizingMask = ([UIViewAutoresizing.flexibleWidth, UIViewAutoresizing.flexibleHeight])
        self.view.backgroundColor = UIColor.lightGray
        
        self._mapView = MKMapView(frame: self.view.bounds)
        if let mapView = self._mapView {
            self.view.addSubview(mapView)
        }
        
        self._locationLookupButton = UIButton(frame: CGRect(x: 0, y: self.view.bounds.size.height - 50, width: self.view.bounds.size.width, height: 50))
        if let locationButton = self._locationLookupButton {
            locationButton.autoresizingMask = [.flexibleWidth, .flexibleTopMargin]
            locationButton.setTitle("Request Location", for: UIControlState())
            locationButton.titleLabel!.font = UIFont(name: "AvenirNext-Regular", size: 16)
            locationButton.backgroundColor = UIColor(red: 115/255, green: 57/255, blue: 248/255, alpha: 1)
            locationButton.addTarget(self, action: #selector(ViewController.handleOneShotLocationButton(_:)), for: .touchUpInside)
            self.view.addSubview(locationButton)
        }
        
        self._permissionLocationButton = UIButton(frame: CGRect(x: 0, y: self.view.bounds.size.height - 100, width: self.view.bounds.size.width, height: 50))
        if let permissionLocationButton = self._permissionLocationButton {
            permissionLocationButton.setTitle("Request Permission", for: UIControlState())
            permissionLocationButton.titleLabel!.font = UIFont(name: "AvenirNext-Regular", size: 16)
            permissionLocationButton.backgroundColor = UIColor(red: 50/255, green: 153/255, blue: 252/255, alpha: 1)
            permissionLocationButton.addTarget(self, action: #selector(handleLocationPermissionButton(_:)), for: .touchUpInside)
            self.view.addSubview(permissionLocationButton)
        }
        
        // setup position
        
