add tests to semaphore branch