add waitForValue and waitForValueWithTimeout: