-*-ray-*- tree building