Code for AppDelegate added