refactor credit card