Ternary

Started on ternary