added a way to end the game