Updated waitForView