huge refactor of the data model