Modified model code