fill tree with smc code