Added ternary test