anchor.diff:  -spec delayfactor() -> pos_integer().
   delayfactor() -> 4.
   
  --spec state_new(comm:mypid(), [{comm:mypid(), pos_integer()}],
  +-spec state_new(comm:mypid(), [rempid()],
                   util:time(), util:time(), atom()) -> state().
   state_new(RemoteHBS, RemotePids, LastPong, CrashedAfter,Table) ->
       {RemoteHBS, RemotePids, LastPong, CrashedAfter, Table, []}.
   
  --spec state_get_rem_hbs(state()) -> comm:mypid().
  +-spec state_get_rem_hbs(state())    -> comm:mypid().
   state_get_rem_hbs(State)            -> element(1, State).
   -spec state_set_rem_hbs(state(), comm:mypid()) -> state().
   state_set_rem_hbs(State, Val)       -> setelement(1, State, Val).
  --spec state_get_rem_pids(state()) -> [{comm:mypid(), pos_integer()}].
  +-spec state_get_rem_pids(state())   -> [rempid()].
   state_get_rem_pids(State)           -> element(2, State).
  --spec state_set_rem_pids(state(), [{comm:mypid(), pos_integer()}]) -> state().
  +-spec state_set_rem_pids(state(), [rempid()]) -> state().
   state_set_rem_pids(State, Val)      -> setelement(2, State, Val).
  --spec state_get_last_pong(state()) -> util:time().
  +-spec state_get_last_pong(state())  -> util:time().
   state_get_last_pong(State)          -> element(3, State).
   -spec state_set_last_pong(state(), util:time()) -> state().
   state_set_last_pong(State, Val)     -> setelement(3, State, Val).
  
positive.code:             state_set_monitors(State,
                                 lists:delete({WatchedPid, MonRef}, Monitors))
      end.
  
negative.code:         unchanged -> S1
      end;
  
  on({check_delayed_del_watching_of, WatchedPid, Time} = _Msg, State) ->
      ?TRACE("fd_hbs check_delayed_del_watching_of ~.0p~n", [_Msg]),
      %% initiate demonitoring and delete local entry if
      %% entry time is still unmodified since this message was triggered
      RemPids = state_get_rem_pids(State),
      case lists:keyfind(WatchedPid, 1, RemPids) of
          false -> log:log(error, "req. to delete non watched pid~n"),
                   State;
          Entry ->
              NewRemPids =
                  case rempid_get_last_modified(Entry) of
                      Time -> %% untouched for whole wait period
                          RemHBS = state_get_rem_hbs(State),
                          case comm:make_local(RemHBS) of
                              fd -> comm:send(RemHBS, {del_watching_of_via_fd, comm:this(), WatchedPid});
                              _ -> comm:send(RemHBS, {del_watching_of, WatchedPid})
                          end,
                          lists:delete(WatchedPid, RemPids);
                      _ ->
                          NewEntry =
                              case rempid_refcount(Entry) of
                                  0 -> %% retrigger delayed del watching
                                      NewTime = os:timestamp(),
                                      msg_delay:send_local(
                                        1, self(),
                                        {check_delayed_del_watching_of,
                                         WatchedPid, NewTime}),
                                      rempid_set_last_modified(Entry, NewTime);
                                  _ ->
                                      rempid_set_pending_demonitor(Entry, false)
                              end,
                          lists:keyreplace(WatchedPid, 1, RemPids, NewEntry)
                  end,
              state_set_rem_pids(State, NewRemPids)
      end;
  
  on({add_watching_of, WatchedPid} = _Msg, State) ->
      ?TRACE("fd_hbs add_watching_of ~.0p~n", [_Msg]),
      %% request from remote fd_hbs: watch a pid locally and forward
  