handle situation of empty job queue and add test