output to template