added all_freq and curr_freq to db