adding some model code