Adding semaphore code