refactored some model classes