added option to format output in html