foldTree -- barely done.