refactored async block