could we use better variable names in here please? not obvious what `a` or `b_ind` are