new function to get event listeners