refactoring data model