Updated code from server.