refactored data model