refactor Events