create model code