mulitple events in 1 function