refactored async_window