modify appdelegate