implemented the game play