updated the complete red-black tree implementation. Need to check