refactoring in CreditCardRepository