added some pipe control code