changed license and added semaphore class