made ternary easier to read