Refine the flow