making waitForElement public