optimized Apriori algorithm