make a copy of a template