wait till loading the view