make "pipe" chain for next refactor and add test case