part A is working well with server.c and client.c