added document-mode to server.