replace instances of childnodes[0] with firstChild