Change the way tree is build