changed getNextJob()