refactor of pipeline to make it an object