modded to read output from index.html