finished all the semaphore homeworks