code for interval tree
changes