added frequency table and additio n