replaced event structs by classes