support pipeline, need refactor