finished semaphore example