controller restructure