add update model function