check for end game