anchor.diff:          dict:to_list(TopKeys)),
       {ok, TopKeyList}.
   
  +sum_stats_values_rec([], [], Rec) ->
  +    Rec;
  +sum_stats_values_rec([], YVals, Rec) ->
  +    lists:reverse(YVals, Rec);
  +sum_stats_values_rec(XVals, [], Rec) ->
  +    lists:reverse(XVals, Rec);
  +sum_stats_values_rec([X | XS], [Y | YS], Rec) ->
  +    sum_stats_values_rec(XS, YS, [X+Y | Rec]).
  +
  +sum_stats_values(XVals, YVals) ->
  +    sum_stats_values_rec(lists:reverse(XVals), lists:reverse(YVals), []).
  +
   get_buckets_stats(PoolId, BucketIds, Params) ->
       [FirstStats | RestStats] =
           lists:map(fun(BucketId) ->
  
positive.code: 
      LastSampleTStamp = case default_find(t, Samples2) of
                             [] -> 0;
                             [First | _Rest] -> First
                         end,
  
      Samples3 = dict:store(ops, sum_stats_ops(Samples2), Samples2),
  
negative.code:     lists:foldl(
        fun({ok, XSamplesInterval, XLastSampleTStamp, XStat},
            {ok, YSamplesInterval, YLastSampleTStamp, YStat}) ->
                XSamplesInterval = YSamplesInterval,
                {ok,
                 XSamplesInterval,
                 %% usually are equal too except when one value is 0 (empty stats)
                 erlang:max(XLastSampleTStamp, YLastSampleTStamp),
                 lists:map(fun({t, TStamps}) -> {t, TStamps};
                              ({Key, XVals}) ->
                                   YVals = proplists:get_value(Key, YStat),
                                   {Key, sum_stats_values(XVals, YVals)}
                          end,
                          XStat)}
        end,
  