Added query constraints