add comments to index.html js functions