events in classes and types