manage controller refactoring