refactored again
refactored all the controllers