changes to server code