Made working version of pipeline