refactored semaphore addition to follow existing parameter patterns