pipe: add a pipe implementation