fixed bug in tree creation
model update