updates model when name is changed