Almost done with part 2: semaphores and task execution