small refactor on the async