fixed while loop parentheses