share pipe code
allow supply flags to pipe