it's way faster to iterate using a for loop and nextSibling