use template to produce output html