finish refactoring validation rules