added range updates to the segment tree implementation