simplify complex ternary if statement