Implement mask triples