Refactoring the events functions