semantic check:
if (needLeftAndRight)
shouldn't that then update: node.left and node.right instead of node.center and node.right?