Added query success and added priority to query