rewrite data model