updating frequency table