add function to output result in html