events refactored