updating save method