Added implicit segment tree. Modified old version of segment tree