updating model code