Replaced `if` with `if and only if`