             switch result {
             case .success(let response):
                 let usersJSON = response.arrayBody
-                self.persistentContainer.sync(usersJSON, inEntityNamed: User.entity().name!) { error in
+                self.dataStack.sync(usersJSON, inEntityNamed: User.entity().name!) { error in
                     completion(.success)
                 }
             case .failure(let response):

        guard let data = try? Data(contentsOf: URL(fileURLWithPath: filePath)) else { return }
        guard let json = try! JSONSerialization.jsonObject(with: data, options: []) as? [[String: Any]] else { return }

        self.persistentContainer.sync(json, inEntityNamed: User.entity().name!) { error in
            completion(.success)
        }
    }

    func syncUsingAlamofire(completion: @escaping (_ result: VoidResult) -> ()) {
        Alamofire.request("https://jsonplaceholder.typicode.com/users").responseJSON { response in
            if let jsonObject = response.result.value, let usersJSON = jsonObject as? [[String: Any]] {
                self.dataStack.sync(usersJSON, inEntityNamed: User.entity().name!) { error in
                    completion(.success)
                }
            } else if let error = response.error {
