frequency table works