         let mailBox: POSMailbox = self.fetchedResultsController.objectAtIndexPath(indexPath) as POSMailbox
         cell.textLabel?.text = mailBox.name
     }
-
+    
+    // convenience method for fetching objects at index path from the database
+    func managedObjectAtIndexPath(indexPath: NSIndexPath) -> NSManagedObject{
+        return self.fetchedResultsController.objectAtIndexPath(indexPath) as NSManagedObject
+    }
+    
     // MARK: - NSFetchedResultsControllerDelegate
     
     func controllerWillChangeContent(controller: NSFetchedResultsController) {

            return self._fetchedResultsController!
        }
    }
    // fetchedResultController set property
    var _fetchedResultsController:NSFetchedResultsController?


    // MARK: - Class initialiser
    
    init(asDataSourceForTableView tableView: UITableView){
        
        self.tableView = tableView
        super.init()
        tableView.dataSource = self
