first (nonworking) draft of Semaphore class