added some model functionality