Added segment tree.