created nested if / else statement

created nested if / else statement