anchor.diff:      Counter;
   trigger_counter_update(IncrFun, {_, Total, Vals}) ->
       L = length(Vals),
  -    Avg = lists:sum(Vals) div L,
  +    Avg = sum(Vals) div L,
       _ = apply(vmq_exo, IncrFun, [Avg]),
       case L < ?MAX_SAMPLES of
           true ->
               {Avg, Total, [0|Vals]};
           false ->
               % remove oldest sample
  -            {Avg, Total, [0|lists:reverse(tl(lists:reverse(Vals)))]}
  +            {Avg, Total, [0|reverse(tl(reverse(Vals)))]}
       end.
   
   prop_val(Key, Args, Default) when is_list(Default) ->
  
positive.code: 
  %% used for testing
  -export([msg_ref/0]).
  
  -define(CLOSE_AFTER, 5000).
  -define(HIBERNATE_AFTER, 5000).
  
negative.code: handle_messages([{deliver_bin, Term}|Rest], Frames, State, Waiting) ->
      handle_messages(Rest, Frames, handle_bin_message(Term, State), Waiting);
  handle_messages([], [], State, Waiting) ->
      {State, reverse(Waiting)};
  handle_messages([], Frames, State, Waiting) ->
      {send_publish_frames(reverse(Frames), State), reverse(Waiting)}.
  
  prepare_frame(QoS, Msg, State) ->
      #state{waiting_acks=WAcks, retry_interval=RetryInterval} = State,
  