use the right way of waiting for a view