made pipline a factory method