added test case for queries