calling done() when all jobs are finished