templates to scripts