implemented the game