extract triplet