change appContext to appDelegate