updated tree script