added writing to index.html