add comments to new structure BB calculation code