creating classes in model