updates window resize event