chnage code to multiple pipe