updated viewDidAppear in main view controller