Added nested if statement and nested function call.