slight change to ternary