added unique_cards function and tests for it