new class for both rbtrees