It doesn't matter whether the while loop ends with break; or with changing a var. It has nothing to do with the while, I think,its just if one function ends the others also do...