reformat template.html