Since  you're waiting for wait = 0 to call the call back this might be better written:

```js
for (var i = slugs.length; i > 0; i--) {
  ...
}
callback(null, finalDetails)