add model code