add functions to the html file