listening to event -- has to be passed as argument