modify the bbl_grouping.py