problems with appDelegate