nested if branch tests