anchor.diff:                  {exception, Exception} ->
                       log:log(error,"Error: exception ~p during handling of ~p in module ~p~n",
                                 [Exception, Message, Module]),
  -                    loop(Module, State, {Options, Slowest});
  +                    loop(Module, On, State, ComponentState);
                   unknown_event ->
                       {NewState, NewComponentState} =
                           handle_unknown_event(Message, State,
                            {Options, Slowest},Module),
  -                    loop(Module, NewState, NewComponentState);
  +                    loop(Module, On, NewState, NewComponentState);
                   kill ->
                       ok;
  +                {'$gen_component', Config, NewState} ->
  +                    {value, {on_handler, NewHandler}} =
  +                        lists:keysearch(on_handler, 1, Config),
  +                    loop(Module, NewHandler, NewState, ComponentState);
                   NewState ->
                       %Stop = erlang:now(),
                       %Span = timer:now_diff(Stop, Start),
  
positive.code: 
  -export([behaviour_info/1]).
  
  -export([start_link/2, start_link/3, start/4, start/2, start/3,wait_for_ok/0]).
  
  -export([kill/1, sleep/2]).
  
  
negative.code: sleep(Pid, Time) ->
      Pid ! {'$gen_component', time, Time}.
  
  %% @edoc change the handler for handling messages
  change_handler(State, Handler) when is_atom(Handler) ->
      {'$gen_component', [{on_handler, Handler}], State}.
  
  %================================================================================
  % generic framework
  %================================================================================
  