rewriting for async