added helper methods for core data for Obj-C in the process of converting that to swift