edited conditional. Added a ternary.