change loop to CountDownLatch for waiting remote channel