ternary added.

ternary added