change to use asyncio