anchor.diff:              end
       end,
       try
  -        InitialState = Module:init(Args),
  -        loop(Module, InitialState, {Options, 0.0})
  +        case Module:init(Args) of
  +            {'$gen_component', Config, InitialState} ->
  +                {value, {on_handler, NewHandler}} =
  +                    lists:keysearch(on_handler, 1, Config),
  +                loop(Module, NewHandler, InitialState, {Options, 0.0});
  +            InitialState ->
  +                loop(Module, on, InitialState, {Options, 0.0})
  +        end
       catch
           throw:Term ->
               log:log(error,"exception in init/loop of ~p: ~p~n", [Module, Term]),
  
positive.code:             throw(Reason)
      end.
  
  -ifndef(SIMULATION).
  loop(Module, State, {Options, Slowest} = _ComponentState) ->
      receive
          {'$gen_compnent', sleep , Time} ->
              timer:sleep(Time),
              loop(Module, State, _ComponentState);
          {'$gen_compnent', kill} ->
              ok;
          % handle failure detector messages
          {ping, Pid, Cookie} ->
              cs_send:send(Pid, {pong, Cookie}),
              loop(Module, State, _ComponentState);
          %% forward a message to group member by its process name
          %% initiated via cs_send:send_to_group_member()
          {send_to_group_member, Processname, Msg} ->
  
negative.code:         %io:format("ok is da~n"),
          ok
      end.
  
  handle_unknown_event(UnknownMessage, State, ComponentState,Module) ->
     log:log(error,"unknown message: ~p in Module: ~p ~n in State ~p ~n",[UnknownMessage,Module,State]),
  