simplified expression to compute weight from shares