modified apriori implementation