Added query() method.