MOD: corrected model code