add API for `pipe` pattern