Refactor to match_cards