refactored controllers