back to stable version with semaphore