Working code from the server.