added the amazing updatePageHTML function