updated Appdelegate