add a test for the reweighting