changing nested if statement to else statement

changing nested if statement to else statement