added checkPipe