refine query part