tried the hw, but can't figure out the DOM, so bunch of copy paste from Lenny's classnotes