updated tree_stats script