refactor incoming_coro() code