Moved nodeList to the top