working code for downloaded html. Fix required for live URIs