updated appdelegate