refactoring to controllers for secondary views