refactorings to segment tree