modified python script to generate whole thing in a html file added