working query tests