closes #1 implement events

closes #1