toying with semaphore