updated code for jobs