fix code to read from pipes to request only what it needs