added rb_tree insertion functions