anchor.diff:      end;
   
   on({get_entries_response, EntryList}, State =
  -       #rr_resolve_state{ operation = {interval_upd, _I, KvvList},
  +       #rr_resolve_state{ operation = {interval_upd, I, KvvList},
                             my_range = MyI,
                             dhtNodePid = DhtPid,
                             feedbackDestPid = FBDest,
                             stats = Stats }) ->
  -    ToUpdate = start_update_key_entry(KvvList, MyI, comm:this(), DhtPid),
  +    MyIKvvList = map_kvv_list(KvvList, MyI),
  +    ToUpdate = start_update_key_entry(MyIKvvList, comm:this(), DhtPid),
       ?TRACE("GET ENTRIES - Operation=~p~n SessionId:~p - #Items: ~p, KVVListLen=~p ; ToUpdate=~p",
              [interval_upd, Stats#resolve_stats.session_id, length(EntryList), length(KvvList), ToUpdate], State),
  +    
       % Send entries in sender interval but not in sent KvvList
  -    % convert keys KvvList to a gb_set for faster access checks
  -    KSet = gb_sets:from_list([element(1, Z) || Z <- KvvList]),
  +    % convert keys KvvList to a gb_tree for faster access checks
  +    MyIKvTree = lists:foldl(fun({KeyX, _ValX, VersionX}, TreeX) ->
  +                                    gb_trees:insert(KeyX, VersionX, TreeX)
  +                            end, gb_trees:empty(), MyIKvvList),
       MissingOnOther = [MX || X <- EntryList,
  -                            not gb_sets:is_element(element(1, (MX = entry_to_kvv(X))), KSet)],
  -    NewState = State#rr_resolve_state{stats = Stats#resolve_stats{diff_size = ToUpdate}},
  +                            not gb_trees:is_defined(element(1, (MX = entry_to_kvv(X))), MyIKvTree)],
  +    
  +    % allow the garbage collection to clean up the KvvList here:
  +    NewState = State#rr_resolve_state{operation = {interval_upd, I, []},
  +                                      stats = Stats#resolve_stats{diff_size = ToUpdate}},
       if ToUpdate =:= 0 ->
              shutdown(resolve_ok, NewState, FBDest, MissingOnOther, []);
          true ->
              % note: shutdown and feedback handled by update_key_entry_ack
  -           NewState#rr_resolve_state{feedbackKvv = MissingOnOther}
  +           NewState#rr_resolve_state{feedbackKvv = {MissingOnOther, MyIKvTree}}
       end;
   
   on({get_entries_response, EntryList}, State =
  
positive.code:     
      {NewUpdOk, NewUpdFail, NewRegenOk, NewRegenFail, NewFBItems} =
          integrate_update_key_entry_ack(
            NewEntryList, UpdOk, UpdFail, RegenOk, RegenFail, FBItems,
            FBDest =/= undefined),
      
      NewStats = Stats#resolve_stats{update_count     = NewUpdOk + 1,
                                     regen_count      = NewRegenOk +1,
                                     upd_fail_count   = NewUpdFail + 1,
                                     regen_fail_count = NewRegenFail + 1},
      NewState = State#rr_resolve_state{stats = NewStats, feedbackKvv = NewFBItems},
      ?ASSERT(_Diff =:= (NewRegenOk + NewUpdOk + NewUpdFail + NewRegenFail)),
      ?TRACE("UPDATED = ~p - Regen=~p", [NewUpdOk, NewRegenOk], State),
      shutdown(resolve_ok, NewState, FBDest, NewFBItems, [feedback_response]);
  
negative.code: on({get_state_response, MyI}, State = 
         #rr_resolve_state{ operation = {key_upd, KvvList},
                            dhtNodePid = DhtPid, stats = Stats }) ->
      MyIKvvList = map_kvv_list(KvvList, MyI),
      ToUpdate = start_update_key_entry(MyIKvvList, comm:this(), DhtPid),
      ?TRACE("GET INTERVAL - Operation=~p~n SessionId:~p~n MyInterval=~p~n KVVListLen=~p ; ToUpdate=~p",
             [key_upd, Stats#resolve_stats.session_id, MyI, length(KvvList), ToUpdate], State),
      
      % Send entries in sender interval but not in sent KvvList
      % convert keys KvvList to a gb_tree for faster access checks
      MyIKvTree = lists:foldl(fun({KeyX, _ValX, VersionX}, TreeX) ->
                                      gb_trees:insert(KeyX, VersionX, TreeX)
                              end, gb_trees:empty(), MyIKvvList),
      
      % allow the garbage collection to clean up the KvvList here:
      NewState = State#rr_resolve_state{operation = {key_upd, []},
                                        stats = Stats#resolve_stats{diff_size = ToUpdate}},
      if ToUpdate =:= 0 ->
             shutdown(resolve_ok, NewState,
                      State#rr_resolve_state.feedbackDestPid, [], []);
         true ->
             % note: shutdown and feedback handled by update_key_entry_ack
             NewState#rr_resolve_state{feedbackKvv = {[], MyIKvTree}}
      end;
  
  on({get_state_response, MyI}, State =
  