improve the pipeline