using the ternary operator