         let mapPoint: CLLocationCoordinate2D = self.mapView.convertPoint(viewPoint, toCoordinateFromView: self.mapView)
         println("CreatePinAtCoordinate mapPoint = \(mapPoint.latitude), \(mapPoint.longitude)") // TODO: remove
         
+        var context: NSManagedObjectContext
+        if bPersistPin {
+            context = sharedContext
+        } else {
+            context = scratchContext
+        }
+        
         // Create a pin (annotation) based on the calculated gps coordinates.
-        let pin: Pin = createPinAtCoordinate(latitude: mapPoint.latitude, longitude: mapPoint.longitude)
+        let pin: Pin = createPinAtCoordinate(latitude: mapPoint.latitude, longitude: mapPoint.longitude, context: context)
         
         if bPersistPin {
+            
             // Display the pin on the map.
-//TODO - debug            showPinOnMap(pin)
+            showPinOnMap(pin)
 
             // TODO: persist the pin
 //TODO - debug             savePin()
-/* 
-//TODO - debug
+
             // TODO: Udacious - As soon as a pin is dropped on the map, the photos for that location are pre-fetched from Flickr
             self.flickr.searchPhotosBy2DCoordinates(pin) {
                 success, error, imageMetadata in

            
            // Create a new Pin instance, display on the map, and save to the context.
            let viewPoint1: CGPoint = recognizer.locationInView(self.mapView)
//TODO - debug            createPinAtPoint(viewPoint1, bPersistPin: true)
            
            return
                

                // Create a new Pin instance, display on the map, and save to the context.
                self.ephemeralPin = createPinAtPoint(viewPoint, bPersistPin: false)
                // TODO: testing. moved to .Ended
                if let pin = self.ephemeralPin {
                    self.ephemeralAnnotations.append(pin.annotation)
                    println("added ephemeral annotation.")
//                }
                
//                if let pin = self.ephemeralPin {
                    // Add the annotation to a local array of annotations.
                    var annotations = [MKPointAnnotation]()
                    annotations.append(pin.annotation)
                    
                    // Add the annotation to the map.
                    self.mapView.addAnnotations(annotations)

                    // Tell the OS that the mapView needs to be refreshed.
                    self.mapView.setNeedsDisplay()
                }
                
                println(".Began ephemeral annotation count = \(self.ephemeralAnnotations.count)")
                println(".Began mapView annotation count = \(self.mapView.annotations.count)")
