refactoring how events are done on the website