Changed pipe function