Changed the way how events are used