added more documentation to template.New