factor out addPipe
LabelPipe and IdPipe, refactoring