some matching bracket insertion work