Adding a core data method