small refactoring

remove bad code - empty return in while cycle
Merge pull request #3 from pavelpower/patch-3

small refactoring