add and replace mode in red-black tree