anchor.diff:         #rr_resolve_state{ operation = {key_upd, KvvList},
                             dhtNodePid = DhtPid,
                             stats = Stats
  -                          }) ->    
  +                          }) ->
       MyPid = comm:this(),
  -    ToUpdate = 
  -        lists:foldl(
  -          fun({Key, Value, Vers}, Acc) ->
  -                  UpdKeys = [X || X <- ?RT:get_replica_keys(Key), intervals:in(X, MyI)],
  -                  lists:foreach(fun(UpdKey) ->
  -                                        comm:send_local(DhtPid, 
  -                                                        {update_key_entry, MyPid, UpdKey, Value, Vers})
  -                                end, UpdKeys),
  -                  Acc + length(UpdKeys)
  -          end, 0, KvvList),
  +    ?TRACE("Start KEY_UPD", []),
  +    {T, ToUpdate} = util:tc(fun() -> lists:foldl(
  +                                       fun({Key, Value, Vers}, Acc) ->
  +                                               UpdKeys = [X || X <- ?RT:get_replica_keys(Key), intervals:in(X, MyI)],
  +                                               _ = [comm:send_local(DhtPid, {update_key_entry, MyPid, UKey, Value, Vers}) || UKey <- UpdKeys],
  +                                               Acc + length(UpdKeys)
  +                                       end, 0, KvvList) 
  +                            end),
  +    ?TRACE("KEY_UPD REQ SEND in ~p", [T]),
  +    
  +%%     ToUpdate = 
  +%%         lists:foldl(
  +%%           fun({Key, Value, Vers}, Acc) ->
  +%%                   UpdKeys = [X || X <- ?RT:get_replica_keys(Key), intervals:in(X, MyI)],
  +%%                   _ = [comm:send_local(DhtPid, {update_key_entry, MyPid, UKey, Value, Vers}) || UKey <- UpdKeys],
  +%%                   Acc + length(UpdKeys)
  +%%           end, 0, KvvList),
       %kill is done by update_key_entry_ack
       ?TRACE("GET INTERVAL - KEY UPD - MYI=~p;KVVListLen=~p ; ToUpdate=~p", [MyI, length(KvvList), ToUpdate]),
       ToUpdate =:= 0 andalso
  
positive.code: on({get_state_response, MyI}, State =
         #rr_resolve_state{ operation = {key_upd_send, _, KeyList},
                            dhtNodePid = DhtPid }) ->    
      FilterKeyList = [K || X <- KeyList, 
                            K <- ?RT:get_replica_keys(X), 
                            intervals:in(K, MyI)],
      UpdI = intervals:from_elements(FilterKeyList),
      comm:send_local(DhtPid, {get_entries, self(), 
                               fun(X) -> intervals:in(db_entry:get_key(X), UpdI) end,
                               fun(X) -> {db_entry:get_key(X),
                                          db_entry:get_value(X), 
                                          db_entry:get_version(X)} end}),
      State;
  
  on({get_entries_response, KVVList}, State =
  
negative.code:                          fun(I) ->
                                   {lists:nth(I, FieldNames), erlang:element(I + 1, Stats)}
                           end),    
      [erlang:element(1, Stats), lists:flatten(Res)].
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % STARTUP
  