Addes semaphore, yet to get it working though