added an input handler and updated the player