add model saving on edit