Updated pipeline to use context