refine pipe function
use closure for Pipe
update info