refactoring, async support