using ternary operator