refactor controllers
more refactoring