auto-rebalancing on parenthesis insertion