added in remove semaphore functionality