anchor.diff:  %%------------------------------------------------------------------------------
   -spec all() -> list(peer()).
   all() ->
  -    []. %TODO implement
  +    gen_server:call(?MODULE, all).
   
   %%------------------------------------------------------------------------------
   %% Get random peer. This may return error when no peer is known to us (unlikely).
  +%% Normally returns {ok, Peer}
  +%%
  +%% The peers are randomly distributed in the sorted gb_tree (due to the use of hash_uri), 
  +%% so we can find a random peer by choosing a point and getting the next peer in gb_tree.
  +%% That's what this function does
   %%------------------------------------------------------------------------------
   -spec get_random() -> get_peer_result().
   get_random() ->
  -    {error, "unimplemented"}. %TODO implement
  +    gen_server:call(?MODULE, get_random).
   
   %%------------------------------------------------------------------------------
   %% Get url from IP and port. IP format: xxx.xxx.xxx.xxx
  
positive.code: %%% gen_server functions
  %%%=============================================================================
  
  -record(state, {peers :: dict:dict(http_uri:uri(),peer())}).
  
  start_link() ->
      gen_server:start_link({local, ?MODULE} ,?MODULE, ok, []).
  
  init(ok) ->
      {ok, #state{peers=dict:new()}}.
  
  handle_call({info, PeerUri}, _From, State) -> {reply, #peer{}, State}; %TODO implement
  handle_call(all, _From, State) -> {reply, [], State}; %TODO implement
  handle_call(get_random, _From, State) -> {reply, {error, "unimplemented"}, State}. %TODO implement
  
  handle_cast({add, Peer}, State) when is_record(Peer, peer) ->
      {noreply, State}; %TODO implement
  handle_cast({add, PeerUrl}, State) ->
      {noreply, State}; %TODO implement
  handle_cast({remove, PeerUrl}, State) ->
      {noreply, State}. %TODO implement
  
  handle_info(_Info, State) ->
      {noreply, State}.
  
negative.code: %% Add peer by url or supplying full peer() record.
  %%------------------------------------------------------------------------------
  -spec add(http_uri:uri() | peer()) -> ok.
  add(Peer) when is_record(Peer, peer) ->
      gen_server:cast(?MODULE, {add, Peer}),
      ok;
  add(PeerUri) ->
      Peer = #peer{uri=PeerUri, last_seen=erlang:system_time()},
      add(Peer).
  
  %%------------------------------------------------------------------------------
  %% Remove peer by url
  %%------------------------------------------------------------------------------
  -spec remove(http_uri:uri()) -> ok.
  remove(PeerUri) ->
      gen_server:cast(?MODULE, {remove, PeerUri}),
      ok.
  
  %%------------------------------------------------------------------------------
  %% Get information (peer() record) of peer with supplied url.
  %% Normally returns {ok, Peer}
  %% If peer not found gives {error, "peer unknown"}
  %%------------------------------------------------------------------------------
  -spec info(http_uri:uri()) -> get_peer_result().
  info(PeerUri) ->
      gen_server:call(?MODULE, {info, PeerUri}).
  
  %%------------------------------------------------------------------------------
  %% Get list of all peers. The list may be big. Use with caution.
  