refactor events support framework