adding more support for red black tree