add segment tree