add coredata support