iterate asynchronously in series through an array