improved the update and save methods