HW4 Part8&9 for index.html