removed nested ternary