anchor.diff:              {ok, MVReg}
       end;
   
  -%% For when users don't provide timestamps
  -%% don't think it is a good idea to mix server and client timestamps
  +%% @doc Assign the value without providing timestamp. The vector clock
  +%% of the register will be incremented by one for the corresponding actor.
   update({assign, Value}, Actor, MVReg) ->
       VV = incVV(MVReg, Actor),
       NewMVReg = [{Value, VV}],
       {ok, NewMVReg};
   
  +%% @doc Propagate is used in case of non-linealizable update. The update
  +%% provides the value and the vector clock for this update. The vector clock
  +%% is supposed to be a single clock instead of a list, since update will combine
  +%% all vector clocks into a single one. All compatible vector clocks (descendent) will be merged;
  +%% non-compatible vector clocks will be kept in a list.
   update({propagate, Value, TS}, _, MVReg ) ->
  -    LocalTS = value(timestamp, MVReg),
  -    LocalDominate = riak_dt_vclock:dominate(LocalTS, TS),
  -    RemoteDominate = riak_dt_vclock:dominate(TS, LocalTS),
  -    case {LocalDominate, RemoteDominate} of 
  -        {true, false} ->
  +    case is_dominated(value(timestamp, MVReg), TS) of 
  +        true ->
               {ok, MVReg};
  -        {false, true} ->
  -            NewMVReg = {Value, TS},
  -            {ok, NewMVReg};
  -        {false, false} ->
  -            NewMVReg = lists:append(MVReg, [{Value, TS}]),
  +        false ->
  +            NewMVReg = merge_to(MVReg, [{Value, TS}]),
               {ok, NewMVReg}
       end.
   
   update(Op, Actor, Reg, _Ctx) ->
       update(Op, Actor, Reg).
   
  +%% @doc Increment one for the corresponding vector clock of this actor.
   incVV(MVReg, Actor) ->
       TSL = [TS || {_Val, TS}<- MVReg],
       [H|T] = TSL,
  
positive.code: %% -------------------------------------------------------------------
  
  %% @doc
  %% An LWW Register CRDT.
  %%
  %% @reference Marc Shapiro, Nuno Preguiça, Carlos Baquero, Marek Zawirski (2011) A comprehensive study of
  %% Convergent and Commutative Replicated Data Types. http://hal.upmc.fr/inria-00555588/
  
negative.code:     Values = value(MVReg),
      TS = value(timestamp, MVReg),
      Size =  erlang:external_size(Values) + erlang:external_size(TS),
      Size;
  stat(_, _) -> undefined. 
  
  -include("riak_dt_tags.hrl").
  -define(TAG, ?DT_MVREG_TAG).
  