slight changes to server codes;