update client.c from branch semaphores