EventGenerator to be able to get method as input
new example using EventGenerator added