Improved sample-pipeline