improve the BBMASK hack