rewrite test for card method