semaphore is now used for sync