extract event listener