Coredata method refactor