moved semaphore