better ternary support