changed save method to also allow for updates