added frequency buckets counting capability