Refactor
Decorate the event callback