Use ternary operator instead of if/else