learned how to properly iterate over a nodelist