refine the query