use while() {} instead of do {} while()