minor refactoring for Apriori