simplifying pipeline code