added model code