ch16: template scripts