validation rules extracted out