Added window resize functionality