refactor semaphore alley