Changed to semaphore list and added comments