Ternary operator added for final printout. Testing.