put the `if` outside the `for`?