restructure all methods of controllers