added semaphore to shell