added creation of tree to model