changed variable of frequencyTable to Double