changed some end game logic