now trying semaphores