added coreData code to AppDelegate.h/m