add test for nested if statement