added tests and events