Redesigning your code as a pipeline