nested if block