modified client.c for bugs