add some code for models