change server with coroutine structure