code to test rb tree