changed to semaphores in waitlist