Updating JS to handle addition of new h2 element