Implemented send event
Improved event handling