refactor to support category style events