adhesion to fsm on server.c and client.c