credit card valdation - feel free to suggest refactoring