updated getNextJob and removeJob()