refine workflow