updated pipeline code