finished ternary