Added query functions