Seperated save and update function