move NodeList definition to the top