Edited nodeList to use nodes