Finished revising getfreq structure