Added an {index} tag in the loop which starts at zero for use within selectNodes and referencing.