segment tree update.
add more fun samples