added a semaphore to shuffle write ...