refine flow