Made while condition shorter and more readable
Merge pull request #9 from sth/patch-while-condition

Made while condition shorter and more readable