Refactoring creadit-card rule