I would move the BB tags  to the CALCULATE_BB_LENS macro In doing so we do not define variables outside the macros.