added Core Data functionality