Added one final if statement with a conditional operator.