some changes to checkWinner