implementing tests and events