refactored general controllers
refactor controllers