added query request and tests.