refine Pipe assignment