anchor.diff:  	    	ets:new(WaitingFsms, [bag, named_table]),
   	    	ets:new(ActiveTxsPerKey, [bag, named_table]),
   	    	ets:new(WriteSet, [bag, named_table]),
  -            {ok, #state{partition=Partition, log=TxLog, prepared_tx=PreparedTx, 
  +            {ok, #state{partition=Partition, log=TxLog, active_tx=PreparedTx, 
   						write_set=WriteSet, waiting_fsms=WaitingFsms, active_txs_per_key=ActiveTxsPerKey}};
           {error, Reason} ->
               {error, Reason}
  
positive.code:     {next_state, clean_and_notify, TxId, State, 0};
  
  handle_command ({get_pending_txs, {Key, TxId}}, Sender, #state{
  			active_txs_per_key=ActiveTxsPerKey, waiting_fsms=WaitingFsms}=State) ->
  	Pending=pending_txs(ets:lookup(ActiveTxsPerKey, Key), TxId),
  	case Pending of
  		[]->
  			{reply, {ok, empty}, State};
  
negative.code: 			
     		end;
  
  handle_command({commit, TxId, TxCommitTime}, _Sender, #state{log=Log, committed_tx=CommittedTx}=State) ->
  			%ale: Log T.writeset
  			Result = dets:insert(Log, {TxId, {committed, TxCommitTime}}),
      		case Result of
          		ok ->
          			ets:insert(CommittedTx, {TxId, committed}),
              		{reply, ack, State};
          		{error, Reason} ->
              		{reply, {error, Reason}, State}
  