reorganized classes in model