use build index from tree