added arrow key support