added reweighting