switch out document.width, document.height for window.innerWidth, window.innerHeight