private static int search2(Cards[] hands, Cards board, int numhands, int[] wins, int[] ties, Cards remaining) {
        int total = 0;
        for (int i = 0; i < remaining.size() - 1; i++) {
            Card card1 = remaining.get(i);
            board.add(card1);
            for (int j = i + 1; j < remaining.size(); j++) {
                Card card2 = remaining.get(i);
                board.add(card2);
                total = rankHands(hands, board, numhands, wins, ties, total);
                board.remove(card2);
            }
            board.remove(card1);
        }
        return total;
    }