add segment tree class