relocated red-black tree and changed rotation bug.