working with window.addEventListener now too.