added some code for creating a model and an instance therof