basic pipe implementation