added brackets around template that needs to be changed for each use of template.c