changed image overlay to use event listener