code to calculate sample wts for b' combo
Commenting out buggy part