fully implemented
Merge branch 'lattice-matched-ternary' into develop