frequent pattern mining code