return the weights object and update package