refactor of xpipeline operators to share more code