added a variable to my ternary

added a variable to my ternary