added tests for events