made lsortFreq immutable