refactoring, for pipeline and wtbox production