TODO: apply pipeline to code