changed controller to handle minification