Title: Ternary codes with weight constraints