implement of basic apriori algorithm