this loop can make the UI unresponsive if there are many nodes on the DOM. 

Also consider doing this without calling querySelectorAll