Start to implement the generateModel(). Not complete yet.