add tests for event generation
cleanup