changed directory of template to /temp, changed order of picture input
for template generation