refactor cluster_job