modified client.c