anchor.diff:      DhtList = element(2, State),
       setelement(2, State, [{Interval, DhtNodePid} | DhtList]).
   
  --spec responsible_dht_node(state() | [cached_dht_node()], ?RT:key()) ->
  -    unknown | cached_dht_node().
  +-spec responsible_dht_node(state() | [cached_dht_node()], ?RT:key()) -> unknown | comm:mypid().
   responsible_dht_node([], _Key) -> unknown;
   responsible_dht_node([{Interval, Pid} | T], Key) ->
       case intervals:in(Key, Interval) of
  
positive.code:                                        end, AllMsgs),
      {setelement(1, State, Rest), Matching}.
  
  -spec pop_undelivered_local_messages(state()) -> [undelivered_msg()].
  pop_undelivered_local_messages(State) ->
      AllMsgs = element(1, State),
      {Matching, Rest} = lists:partition(fun({{local, _Key, _KeyPos}, _Msg}) -> true;
  
negative.code:             comm:send_local(LocalDhtPid, NewMsg)
      end.
  
  -spec add_undelivered_message(state(), {local, ?RT:key(), non_neg_integer()} |
                                ?RT:key(), comm:message()) -> state().
  add_undelivered_message(State, Key, Msg) ->
      MsgList = element(1, State),
      setelement(1, State, [{Key, Msg} | MsgList]).
  
  -spec pop_undelivered_messages(state(), intervals:interval()) -> {state(), [undelivered_msg()]}.
  pop_undelivered_messages(State, Interval) ->
      AllMsgs = element(1, State),
      {Matching, Rest} = lists:partition(fun({Key, _Msg}) ->
  