Some query functions added.