now writes html file