Implemented Ternary