new implementation of events
removed test code and old events