controllers refactored