diameter of a tree