anchor.diff:  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,
  +    FKeyList = [K || X <- KeyList, K <- ?RT:get_replica_keys(X), 
  +                     intervals:in(K, MyI)],
  +    KeyTree = gb_sets:from_list(FKeyList),
  +    comm:send_local(DhtPid, {get_entries, self(),
  +                             fun(X) -> gb_sets:is_element(db_entry:get_key(X), KeyTree) end,
                                fun(X) -> {db_entry:get_key(X),
                                           db_entry:get_value(X), 
  -                                        db_entry:get_version(X)} end}),
  +                                        db_entry:get_version(X)} end}),    
       State;
   
   on({get_entries_response, KVVList}, State =
  
positive.code:                          fun(I) ->
                                   {lists:nth(I, FieldNames), erlang:element(I + 1, Stats)}
                           end),    
      [erlang:element(1, Stats), lists:flatten(lists:reverse(Res))].
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % STARTUP
  
negative.code:        #rr_resolve_state{ operation = {key_upd, KvvList},
                            dhtNodePid = DhtPid,
                            stats = Stats
                            }) ->
      MyPid = comm:this(),
      ?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
  