update Appdelegate