updated to work with job_scheduler slightly differently