changed from reentrant lock to count down latch