refactoring validations