uhpdate code to extract templates and add print statements to template fit code
merge