#330 Added function for retrieving index of the root node