closing the pipe