added action to the save button