improve validation rules