restructuring of templates