Please use the same style for all loops (opening parentheses in the same line)
while (..) {
...
}