added window resize routine