another tiny speedup
pass b vec to match fxns