add event system
Merge pull request #82 from ethna/events

add event system