preliminary conversion to asyncio