added code for event handling
Merge pull request #21 from voidabhi/event-module

added code for event handling