update some codes in template
update some codes in templates