added an example of using a CountDownLatch