anchor.diff:                          true ->
                               State1 = State#state{
                                   n_events=NEvents,
  -                                nums=incr_below(Value, State#state.nums),
                                   high_trending=HighTrending,
                                   new_nums=incr(Value, State#state.new_nums)
                               };
                           false ->
                               State1 = State#state{
                                   n_events=NEvents,
  -                                nums=incr_below(Value, State#state.nums),
                                   high_trending=HighTrending
                               }
                       end,
  
positive.code:     
      incr_below(V, [{N,BelowN}|Ns], Acc) when V =< N ->
          incr_below(V, Ns, [{N,BelowN+1}|Acc]);
      incr_below(_, Ns, Acc) ->
          lists:reverse(Acc, Ns).
  
  
  % Replace the sample count with the number of samples below the value.
  
negative.code:     [{NewHighVal,NewHighBelow}|NewNumsBelow] = zip_below(LastBelow, lists:sort(State#state.new_nums), []),
      NewNumsBelow1 = lists:reverse([{NewHighVal, NewHighBelow+State#state.n_above_max}| NewNumsBelow]),
      {NumsBeforeBelow,_} = lists:split(length(NewNumsBelow1), State#state.nums), 
  
      State#state{
          nums=NumsBeforeBelow++NewNumsBelow1,
          high_trending=false,
  