Used async.whilst
Added async.whilst