add open source rb-tree code