model code corrected