refactoring Events controller