changed the if statement  to a ternary and alerted the user of the info