added functions to find all matching partitions