added function for HTML output