anchor.diff:          	[]->
           		OpsDict=orddict:new();
           	[{_, OpsDict}]->
  -        		lager:info("OpsDict= ~p",[OpsDict])
  +        		lager:info("materialiser_vnode: OpsDict= ~p",[OpsDict])
           	end,
  -        	OpsDict1=orddict:append(DownstreamOp#clocksi_payload.commit_time, DownstreamOp, OpsDict),
  +        	OpsDict1=orddict:store(DownstreamOp#clocksi_payload.commit_time, DownstreamOp, OpsDict),
               true = ets:insert(OpsCache, {Key, OpsDict1}),
               {reply, ok, State};
           {error, Reason} ->
  
positive.code: terminate(_Reason, _State) ->
      ok.
  
  -spec get_latest_snapshot(orddict:orddict(), integer()) -> {ok, term()} | {error, atom()}.
  get_latest_snapshot(SnapshotDict, SnapshotTime) ->
  	case SnapshotDict of
  	[]->
  		{ok,[]};
  	[H|T]->
  		lager:info("These are the stored Snapshots: ~p",[H|T]),
  		{CommitTime, Snapshot} = lists:last(orddict:filter(fun(Key, _Value) -> 
  				belongs_to_snapshot(Key, SnapshotTime, materialised_version) end, [H|T])),
  		{ok, {CommitTime, Snapshot}}
  	end.
  
  -spec get_ops_to_apply(orddict:orddict(), integer()) -> {ok, list()} | {error, atom()}.
  get_ops_to_apply(OpsDict, SnapshotTime) ->
  	case OpsDict of
  	[]->
  		{ok, []};
  	[H|T]->
  		lager:info("operations that are in the operation store are: ~p",[[H|T]]),
  		lager:info("SnapshotTime=~p",[SnapshotTime]),
      	FilteredOps = orddict:filter(fun(Key, _Value) -> belongs_to_snapshot(Key, SnapshotTime, operation) end, [H|T]),
      	{ok,[Op || { _Key, Op} <- FilteredOps]}
      end.
  
  %% @doc Check whether a Key's Snapshot is included in a snapshot
  %%      Input: Dc = Datacenter Id
  %%             CommitTime = local commit time of this Snapshot at DC
  %%             SnapshotTime = Orddict of [{Dc, Ts}]
  %%      Outptut: true or false
  -spec belongs_to_snapshot({Dc::term(),CommitTime::non_neg_integer()},
                          SnapshotTime::vectorclock:vectorclock(), atom()) -> boolean().
  belongs_to_snapshot({Dc, CommitTime}, SnapshotTime, CheckType) ->
  	lager:info("is ~p in snapshot? DC= ~p - CommitTime = ~p", [CheckType, Dc, CommitTime]),
      case vectorclock:get_clock_of_dc(Dc, SnapshotTime) of
          {ok, Ts} ->
              lager:info("CommitTime: ~p SnapshotTime: ~p Result: ~p",
                         [CommitTime, Ts, CommitTime =< Ts]),
              CommitTime =< Ts;
          error  ->
  
negative.code: handle_command({read, Key, Type, SnapshotTime}, _Sender,
  		State = #state{ops_cache=OpsCache, snapshot_cache=SnapshotCache}) ->
                            
      %lager:info("materialiser_vnode: operations: ~p", [Operations]),
      % get the latest snapshot for the key
      case ets:lookup(SnapshotCache, Key) of
      	[] ->
  