arrange globaldata,config
code refactoring