try to modify the weighting update method (not finished yet)