Add event handler
Merge pull request #69 from windyarts/fix-wdapi

Add event handler