minor layout change. calling notifyAll to ensure all threads are notified