put window resize handler into code