wrote most ofthe code needed to start the pipeline