update the Events logic
Merge pull request #11 from ycj28c/master

update the Events logic