 
         // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
         // self.navigationItem.rightBarButtonItem = self.editButtonItem()
+        let btnRefresh = UIBarButtonItem(title: "Refresh", style: UIBarButtonItemStyle.Plain, target: self, action: "loadData")
+        self.navigationItem.rightBarButtonItem = btnRefresh
         let btnAdd = UIBarButtonItem(title: "Add", style: UIBarButtonItemStyle.Done, target: self, action: "AddName")
         self.navigationItem.leftBarButtonItem = btnAdd
         self.tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: self.cellIdentifier)

        self.presentViewController(alert, animated: true, completion: nil)
    }
    
    override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        // #warning Incomplete implementation, return the number of sections
        return 1


class MainTableViewController: UITableViewController {

    var Names: [String] = [String]()
    var people: [NSManagedObject] = [NSManagedObject]()
    let cellIdentifier = "reuseIdentifier"
    
    override func viewDidLoad() {
