improvement - now after the end of the game, the menu still shows up and we can restart game.
removed imports and fixed method