model by tree