rename global_opts to session_opts