refactor the data model