statrt refactor events