added a countdownlatch to synchronize thread starts