check if node_index function works the right way