     }
 }
 
-struct Parameter {
-    
-    let parentPath: String
-    let childKey: String
-    let mutator: (Any) -> Any
-    let completion: (RequestResult) -> Void
-    
-    init(parentPath: String, childKey: String, mutator: @escaping (Any) -> Any, completion: @escaping (RequestResult) -> Void) {
-        self.parentPath = parentPath
-        self.childKey = childKey
-        self.mutator = mutator
-        self.completion = completion
-    }
-}

                }
                
            case .succeeded:
                self.deleteTransaction(param: param)
                param.completion(result)
            }
        }
    }
    
    internal func deleteTransaction(param: Parameter) {
        let deletePath = path.build("\(temporaryPath)/\(param.parentPath)")
        request.delete(path: deletePath) { _ in }
    }
    
    internal func checkTryCount(param: Parameter, pass: () -> Void) {
        if tryCount + 1 == maxTry {
            deleteTransaction(param: param)
            param.completion(.failed(RequestError.maxTryReached))
            tryCount = 0
            
        } else {
            tryCount += 1

                    return
                }
                
                let info = ["\(param.parentPath)/\(param.childKey)": [".sv": "timestamp"]]
                let writePath = self.path.build(self.temporaryPath)
                self.writeTransaction(param: param, info: info, writePath: writePath)
                
            case .succeeded(let info):
                guard let string = info as? String, let timestamp = Double(string) else {
                    self.checkTryCount(param: param) {
                        self.readTransaction(param: param, readPath: readPath)
                    }
                    return
                }
                
                let now = Date()
                let transactionDate = Date(timeIntervalSince1970: timestamp / 1000)
                let seconds: Int = Calendar.current.dateComponents([.second], from: transactionDate, to: now).second ?? 0
                
                if seconds > Int(self.temporaryPathExpiration) {
                    let info = ["\(param.parentPath)/\(param.childKey)": [".sv": "timestamp"]]
                    let writePath = self.path.build(self.temporaryPath)
                    self.writeTransaction(param: param, info: info, writePath: writePath)
                
                } else {
                    self.checkTryCount(param: param) {
                        self.readTransaction(param: param, readPath: readPath)
                    }
                }
            }
        }
