simplify by removing useless get_next_job