index to tree