refine pipeline