refactor datamodel