refactor, implement forEach node iterator