updated rb-tree