improved the game (exercise 4.4)