This totally works. I would use a ```break``` here instead to get out of the loop.