added second stalemate condition