expanded nested if