total refactor of data model