there is a flaw in the logic with regards to how it handles transversing back up the tree at the end of an element
there is a flaw in the logic with regards to how it handles transversing back up the tree at the end of an element