added key press handling in game