Returning a tree-query for refining