small refactoring

remove bad code - empty return in while cycle