refactor of job pipeline