refactored entity classes