use ternary operator