State transition as coroutines