updated appdelegate.m