added semaphore script