add NSFetchedResultControllerDelegate methods and tableview delegate methods.