made each the query way