     return res
 }
 
-private func _readTVar<T: TVarProtocol> (tvar: TVar<T>, trans: Transactions) -> (T, Transactions) {
+private func __readTVar<T: TVarProtocol> (tvar: TVar<T>, trans: Transactions) -> (T?, Transactions) {
     let id = tvar.id
     
     trans.thereIsNoReads = false

    }
}

private func _readTVar<T> (tvar: TVarArray<T>, trans: Transactions) -> ([T], Transactions) {
    let id = tvar.id
    
    trans.thereIsNoReads = false

    
    if let (readLog, writeLog) = trans.log[id]  {
        if let val = writeLog {
            return ((val as T), trans)
        } else {
            let copy = tvar.value.copy() as T
            trans.log[id] = (copy, writeLog)
