refactored some controllers