updating frequncy tables