complete rbtree insert function, add some comment