added common code to HTML file