rewriting conditional as continue statement is illegal there