refactor the eventbus initialization to be together