tree-TM code needed for ITM UI