create model factory class