     var dataSource: ArrayDataSource!
     var configureCell: ConfigureCell!
     var comics: [Comic] = []
-    var selectedComic: Comic!
+    let fileImageManager = FileImageManager()
     
+    var selectedIndex: NSIndexPath!
+    var customCovers = [String]()
     let imagePickerController = UIImagePickerController()
     
     var fetchingData = false

                    let placeholderImage = UIImage(named: "Logo")
                    
                    comicCell.titleLabel.text = comic.title
                    comicCell.coverImageView.sd_setImageWithURL(NSURL(string: comic.imageURL), placeholderImage:placeholderImage)
            }
        }
        

    // MARK: UIImagePickerControllerDelegate
    func imagePickerController(picker: UIImagePickerController, didFinishPickingImage image: UIImage, editingInfo: [String : AnyObject]?) {
        
        self.dismissViewControllerAnimated(true) {
        
            let filePath = self.fileImageManager.saveImage(image, name: self.comics[self.selectedIndex.row].title)
            
            if let _ = filePath {
                self.customCovers.append(self.comics[self.selectedIndex.row].title)
                
                self.tableView.beginUpdates()
                self.tableView.reloadRowsAtIndexPaths([self.selectedIndex], withRowAnimation: UITableViewRowAnimation.Automatic)
                self.tableView.endUpdates()
            }
        }
    }
}