add rb_tree implementation