added ending to the game