     
     override func viewWillAppear(animated: Bool) {
         super.viewWillAppear(animated)
-        
-        let fetchRequest = NSFetchRequest(entityName: USER_ENTITY)
-        
-        do {
-            let results =
-            try DELEGATE.managedObjectContext.executeFetchRequest(fetchRequest)
-            
-            users = results as! [User!]
-            
-        } catch let error as NSError {
-            print("\(FETCH_ERR)\(error),\(error.userInfo)")
-        }
+        self.fetchData()
     }
     
     override func viewDidLoad() {

            if (success) {
                APIClient.shared.getUsers(TOKEN) { (success, error) -> Void in
                    if(success) {
                        self.tableView.reloadData()
                        self.tableView.reloadInputViews()
                    }
                }
            }

                    }
                }
            }
        }
    }
    
    func fetchData() {
        let fetchRequest = NSFetchRequest(entityName: USER_ENTITY)
        
        do {
            let results =
            try DELEGATE.managedObjectContext.executeFetchRequest(fetchRequest)
            
            users = results as! [User!]

            self.tableView.reloadData()
            self.tableView.reloadInputViews()
            
        } catch let error as NSError {
            print("\(FETCH_ERR)\(error),\(error.userInfo)")
        }
    }
    
