just have to integrate semaphore part now