Adapt coredata