update brackets matching