modified event listener