prepare refactor to pipeline to support next feature.