add red-black tree code