static List<List<Card>> checkPairs(List<Card> cards) {
        boolean skipIter;
        Card temp;
        List<Card> bottomSet;
        List<Card> currentSet;
        List<Card> topSet;
        List<List<Card>> sets;
        
        temp = cards.get(0);
        skipIter = true;
        bottomSet = new ArrayList<>();
        currentSet = new ArrayList<>();
        topSet = new ArrayList<>();
        sets = new ArrayList<>();
        
        Collections.sort(cards, new ValueComparator());
        // find first set of matches
        for (Card card: cards) {
            // skip first iteration
            if (skipIter) {
                skipIter = false;
                temp = card;
                continue;
            }
            
            if (temp.value == card.value) {
                if (currentSet.isEmpty()) currentSet.add(temp);
                currentSet.add(card);
            } else if (!currentSet.isEmpty()) {
                    if (topSet.isEmpty()) {
                        topSet = currentSet;
                        currentSet.clear();
                    } else {
                        // make sure top cards are in topSet
                        bottomSet = topSet;
                        topSet = currentSet;
                        currentSet.clear();
                        break;
                    }
            }
            temp = card;
        }
        
        sets.add(topSet);
        sets.add(bottomSet);
        return sets;
    }