add event boilerplate