small controller refactoring