finishes the game