anchor.diff:  
   handle_call({ clear, Stat }, _From, Stats) ->
   	{ reply, ok, reset(Stats,Stat) };
  +
  +handle_call({ sum, Stat }, _From, Stats = #stats{ windows = Windows }) ->
  +	case proplists:lookup(Stat,Windows) of 
  +		{ Stat, Values } -> Sum = lists:foldl(fun(A,B) -> A+B end, 0, Values);
  +		none -> Sum = 0
  +	end,
  +	{ reply, Sum, Stats };
  +
  +handle_call({ avg, Stat }, _From, Stats = #stats{ windows = Windows }) ->
  +	case proplists:lookup(Stat,Windows) of 
  +		{ Stat, Values } -> Avg = lists:foldl(fun(A,B) -> A+B end, 0, Values)/length(Values);
  +		none -> Avg = 0
  +	end,
  +	{ reply, Avg, Stats };
   
   handle_call(Message,_From,Stats) ->
   	io:format("[stats] unknown message ~p~n", [ Message ]),
  
positive.code: clear(Stat) ->
  	gen_server:call(?MODULE, { clear, Stat }).
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % Private APU
  %
  
negative.code: 	Stats#stats{ windows =  [ { Stat, Window } | proplists:delete(Stat,Windows) ]}.
  
  
  
  