creditcard refactor