public static Hand findHand(Card[] tableCards, Card[] holeCards) {
        allCards = new Card[7];
        System.arraycopy(holeCards, 0, allCards, 0, holeCards.length);
        System.arraycopy(tableCards, 0, allCards, holeCards.length, tableCards.length);

        Arrays.sort(allCards);
        Hand h = isRoyalFlush(allCards);
        if (h.getIndex() == 0) {
            h = isStraightFlush(allCards);
            if (h.getIndex() == 0) {
                h = isFourOfAKind(allCards);
                if (h.getIndex() == 0) {
                    h = isFullHouse(allCards);
                    if (h.getIndex() == 0) {
                        h = isFlush(allCards);
                        if (h.getIndex() == 0) {
                            h = isStraight(allCards);
                            if (h.getIndex() == 0) {
                                h = isThreeOfAKind(allCards);
                                if (h.getIndex() == 0) {
                                    h = isTwoPairs(allCards);
                                    if (h.getIndex() == 0) {
                                        h = isPair(allCards);
                                        if (h.getIndex() == 0) {
                                            h = isHighCard(allCards);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        return h;
    }