the basic frame of rbtree