rb tree code updates