Added the ternary that will display results based on the user input