anchor.diff:  %%		wait for it to finish (synchronous) and go to the prepareOP to execute the next
   %%		operation.
   executeOp(timeout, SD0=#state{
  -                            currentOp=CurrentOp,
  -                            txid=TransactionId,
  -                            updated_partitions=UpdatedPartitions,
  -							read_set=ReadSet,
  -                            currentOpLeader=CurrentOpLeader}) ->    
  -    {OpType, Key, Param}=CurrentOp,                       
  +                          currentOp=CurrentOp,
  +                          txid=TransactionId,
  +                          updated_partitions=UpdatedPartitions,
  +                          read_set=ReadSet,
  +                          currentOpLeader=CurrentOpLeader}) ->
  +    {OpType, Key, Param}=CurrentOp,
       lager:info("ClockSI-Coord: Execute operation ~w ~n",[CurrentOp]),
       {IndexNode, _} = CurrentOpLeader,
       case OpType of
  
positive.code: 
  %% States
  -export	([prepareOp/2, executeOp/2, finishOp/3, prepare_2PC/2, 
  		receive_prepared/2, committing/2, receive_committed/2, abort/2, receive_aborted/2,
  		reply_to_client/2]).
  
  
  %-record(operationCSI, {opType, key, params}).
  
  %%---------------------------------------------------------------------
  %% Data Type: state
  
negative.code: %%	the prepare_2PC state sends a prepare message to all updated partitions and goes
  %%	to the "receive_prepared"state. 
  prepare_2PC(timeout, SD0=#state{txid=TransactionId, updated_partitions=UpdatedPartitions}) ->
      case length(UpdatedPartitions) of
          0->
              SnapshotTime=TransactionId#tx_id.snapshot_time,
              {next_state, committing, SD0#state{state=prepared, commit_time=SnapshotTime}, 0};
          _->
              clockSI_vnode:prepare(UpdatedPartitions, TransactionId),
              NumToAck=length(UpdatedPartitions),
              {next_state, receive_prepared, SD0#state{txid=TransactionId, num_to_ack=NumToAck, state=prepared}}
      end.	
  
  %%	in this state, the fsm waits for prepare_time from each updated partitions in order
  %%	to compute the final tx timestamp (the maximum of the received prepare_time).  
  receive_prepared({prepared, ReceivedPrepareTime}, S0=#state{num_to_ack= NumToAck, prepare_time=PrepareTime}) ->		
      MaxPrepareTime = max(PrepareTime, ReceivedPrepareTime),
      case NumToAck of 1 -> 
              lager:info("ClockSI: Finished collecting prepare replies, start committing... Commit time: ~w~n",[MaxPrepareTime]),
              {next_state, committing, S0#state{prepare_time=MaxPrepareTime, commit_time=MaxPrepareTime, state=committing},0};
          _ ->
              lager:info("ClockSI: Keep collecting prepare replies~n"),
              {next_state, receive_prepared, S0#state{num_to_ack= NumToAck-1, prepare_time=MaxPrepareTime}}
      end;
  
  receive_prepared(abort, S0) ->
      {next_state, abort, S0, 0};   
  
  receive_prepared(timeout, S0) ->
      {next_state, abort, S0 ,0}.
  
  %%	after receiving all prepare_times, send the commit message to all updated partitions,
  %% 	and go to the "receive_committed" state.
  committing(timeout, SD0=#state{txid=TransactionId, updated_partitions=UpdatedPartitions, commit_time=CommitTime}) -> 
      NumToAck=length(UpdatedPartitions),
      case NumToAck of
          0 ->
              lager:info("ClockSI-Coord: No updated partitions. Committing and replying to client."),
              {next_state, reply_to_client, SD0#state{state=committed}, 0};
          _ ->
              clockSI_vnode:commit(UpdatedPartitions, TransactionId, CommitTime),
              {next_state, receive_committed, SD0#state{num_to_ack=NumToAck}}
      end.
  
  %%	the fsm waits for acks indicating that each partition has successfully committed the tx
  %%	and finishes operation.
  %% 	Should we retry sending the committed message if we don't receive a reply from
  