refactored core data model initalizer