added semaphore to comments