restructuring the way tuple matches are made to be based on subsets