check true not false in while loop