moving function getIndexes for EnumerateCollectionNode from h to cpp file.