replaced async.forEach with async.eachSeries