updated code with job acceptance