anchor.diff:  handle_call({watch, Pid, Tag, Pieceset}, _, State) ->
       #state{
           num_peers=Numpeers,
  -        subscriptions=Subscriptions} = State,
  +        watchers=Watchers} = State,
       %% Use a monitor reference as the subscription reference,
       %% this let's us tear down subscriptions when client processes
       %% crash. Currently the interface of the monitorset module does
       %% not let us associate values with monitor references so there
       %% is no benefit to using it in this case.
       Ref = monitor(process, Pid),
  -    Subscription = #subscription{
  +    Watcher = #watcher{
           pid=Pid,
           ref=Ref,
           tag=Tag,
           pieceset=Pieceset},
  -    NewSubscriptions = [Subscription|Subscriptions],
  +    NewWatchers = [Watcher|Watchers],
       Piecelist = sorted_piecelist(Pieceset, Numpeers),
       NewState = State#state{
  -        subscriptions=NewSubscriptions},
  +        watchers=NewWatchers},
       {reply, {ok, Ref, Piecelist}, NewState}.
   
   
  
positive.code:     #state{
          peer_monitors=Monitors,
          num_peers=Numpeers,
          subscriptions=Subscriptions} = State,
      Prev = array:get(PieceIndex, Numpeers),
      NewNumpeers = array:set(PieceIndex, Prev + 1, Numpeers),
      NewMonitors = etorrent_monitorset:update(Pid, Pieceset, Monitors),
      send_updates(PieceIndex, Subscriptions, NewNumpeers),
      NewState = State#state{
          peer_monitors=NewMonitors,
          num_peers=NewNumpeers},
  
negative.code:             Pieceset = etorrent_monitorset:fetch(Pid, Monitors),
              NewNumpeers = decrement(Pieceset, Numpeers),
              NewMonitors = etorrent_monitorset:delete(Pid, Monitors),
              send_updates(Pieceset, Watchers, NewNumpeers),
              INewState = State#state{
                  peer_monitors=NewMonitors,
                  num_peers=NewNumpeers},
              INewState;
          false ->
              NewWatchers = lists:keydelete(Ref, #watcher.ref, Watchers),
              State#state{watchers=NewWatchers}
      end,
      {noreply, NewState}.
  
  