load the event listener earlier