second refactor of checkForWinningMoves