         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

    /* Flickr api wrapper object */
    let flickr = Flickr()
    
    /* core data managed object context */
    lazy var sharedContext: NSManagedObjectContext = {
        return CoreDataStackManager.sharedInstance().managedObjectContext!
    }()
    
    /* The pin instance that is saved to Core Data. */

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