more controller refactoring