added wait for view stuff