changed "id" to "class" in write_html()