anchor.diff:                      PState = TraceEntry#state.passed_state,
                       InfectedMsg = epidemic_reply_msg(PState, From, To, Msg),
                       ?TRACE("delivering msg to execute: ~.0p~n", [InfectedMsg]),
  +                    %% call the callback function (if any) before sending out the msg
  +                    ?TRACE("executing callback function~n", []),
  +                    CallbackFun = TraceEntry#state.callback_on_deliver,
  +                    CallbackFun(From, To, Msg),
                       %% Send infected message with a shepherd. In case of send errors,
                       %% we will be informed by a {send_error, Pid, Msg, Reason} message.
                       comm:send(comm:make_global(To), InfectedMsg, [{shepherd, self()}]),
  
positive.code:          passed_state            = ?required(state, passed_state)
                                         :: none | passed_state(),
           num_possible_executions = ?required(state, passed_state)
                                         :: pos_integer()
          }).
  
  -type state_t() :: #state{}.
  -spec start() -> ok.
  start() -> start(default).
  
  
negative.code: -export([start/0, start/1, start/2, stop/0]).
  -export([start_deliver/0, start_deliver/1]).
  -export([get_infos/0, get_infos/1]).
  -export([register_callback/1, register_callback/2]).
  -export([cleanup/0, cleanup/1]).
  
  %% report messages from other modules
  