add update function in modal