add utils
refine generic functions for Pipe (#32)