refactoring
modify global controller