-*-ray-*-tree traversing, better tree construction