added function to export to html