add pipe constructor functions
make sure reader can read entire data before EOF