Use `continue` to avoid nesting ifs