better saving of weights