update template structure