some changes to server.c