     // Outlet & action - save button
     @IBOutlet var saveButton: UIBarButtonItem!
     @IBAction func saveButtonAction(sender: UIBarButtonItem) {
-        
-        UIImageWriteToSavedPhotosAlbum(self.previewImageView.image!, nil, nil, nil)
-        
-        print("Image Saved")
+        // save image to photo gallery
+        self.saveImageToPhotoGallery()
     }
     
     

    
    // Selected image
    var selctedImage: UIImage!
    
    
    // message label
    @IBOutlet var messageLabel: UILabel!

    // Outlet & action - camera button 
    @IBOutlet var cameraButton: UIBarButtonItem!
    @IBAction func cameraButtonAction(sender: AnyObject) {
        // show action shee to choose image source.
        self.showImageSourceActionSheet()
    }
    
