save and update method done