adds onEvent template for usage within eventbus