move main methods from derived controller to base controller. define table for set format of template