Use pipe number to know if data is available
Update examples to simplify