refactoring match method to match a card collection