Made the pipeline stateful