use async to refactor callback nesting