Functional regular requirements. Changed semaphore to synchronize