add functionality to generate html.