refactoring of save & update done