refactoring validation number