triplet class