refactored all controllers