encapsulate the event parameters into a class