add horizontal movement and window resize