pre adding model code