Fix docstring.
Add while loop.