add modes and globals to server