Added query option to the plugin