Add comments of what each thing does
Add semaphore