refactored a few controllers