why nest the `if`?