finished refactoring controllers