closes #6 integrate events

closes #6