reorganize the global vars in script and debug the outer-sphere configuration