Modified AppDelegate.m