update coroutine implementation