refactored validations