refactored add card