added semaphore example