refactor data model