added some tests with implementation when a query returns only one result and more than one result