mostly implemented HTML-file-writing code example