- refactored to use when library - using promises to remove some levels
of nesting in the async calls
- removed lint warning