Added ternary to my code.