optimized jobs_list function